//"139.224.128.87"是远程服务器的地址，"localhost"是本地的地址，"192.168.43.64"是平板热点里的本机地址
var serverAddress = "localhost";//服务器地址
serverAddress = window.location.hostname.toString()

//声明服务的接口端口
var webResourcesServicePort = 9000;//9000
var authenticationServicePort = 9006;//9002
var deptEmpManageServicePort = 9006;//9003
var permissionServicePort = 9006;//9024

//认证权限(包括登录，注册，修改自己密码的权限)
var authPermString = "authentication-permission";
//部门权限(包括增删改查)
var deptPermString = "department-permission";
//职位权限(包括增删改查)
var posPermString = "position-permission";
//员工权限(包括增删改查)
var empPermString = "employee-permission";
//用户权限(包括增删改查)
var userPermString = "user-permission";
//角色权限(包括增删改查)
var rolePermString = "role-permission";
//检查权限的权限
var checkPermString = "check-permission";
//查看员工的权限
var showEmpPerm = "show-employee-permission";
//游客权限
var guestPermString = "guest";
//主页权限
var indexPermString = "index-permission";

//跳转到登录页面的接口
var to_login = "http://"+serverAddress+":"+webResourcesServicePort+""+"/login";
//跳转到注册页面的接口
var to_register = "http://"+serverAddress+":"+webResourcesServicePort+""+"/register";
//跳转到主页面的接口
var to_index = "http://"+serverAddress+":"+webResourcesServicePort+""+"/index";
//跳转到简历管理的接口
var to_resume = "http://"+serverAddress+":"+webResourcesServicePort+"/"+empPermString+"/resume-manage";
//跳转到实习员工的接口
var to_internship = "http://"+serverAddress+":"+webResourcesServicePort+"/"+empPermString+"/internship-manage";
//跳转到正式员工的接口
var to_regular = "http://"+serverAddress+":"+webResourcesServicePort+"/"+empPermString+"/regular-manage";
//跳转到离职员工的接口
var to_departure = "http://"+serverAddress+":"+webResourcesServicePort+"/"+empPermString+"/departure-manage";


/* 认证权限 */
//登录接口
var loginInterface = "http://"+serverAddress+":"+authenticationServicePort+"/api/"+authPermString+"/login-by-info";
//注册接口
var registerInterface = "http://"+serverAddress+":"+authenticationServicePort+"/api/"+authPermString+"/register";
//修改密码接口
var changePasswordInterface = "http://"+serverAddress+":"+authenticationServicePort+"/api/"+authPermString+"/password";
//退出登录接口
var logoutInterface = "http://"+serverAddress+":"+authenticationServicePort+"/api/"+authPermString+"/logout-by-token";


/* 部门权限 */
//获取全部门接口
var getAllDepartmentsInterface = "http://"+serverAddress+":"+deptEmpManageServicePort+"/api/"+deptPermString+"/department-curd/departments";
//部门接口
var departmentInterface = "http://"+serverAddress+":"+deptEmpManageServicePort+"/api/"+deptPermString+"/department-curd/department";


/* 职位权限 */
//职位接口
var positionInterface = "http://"+serverAddress+":"+deptEmpManageServicePort+"/api/"+posPermString+"/position-curd/positions";
//获取全部门(给职位页面用)接口
var getAllDepartmentsWithPositions = "http://"+serverAddress+":"+deptEmpManageServicePort+"/api/"+posPermString+"/position-curd/get-all-departments-with-positions";


/* 员工权限 */
//员工接口
var employeeInterface = "http://"+serverAddress+":"+deptEmpManageServicePort+"/api/"+empPermString+"/employee-curd/employee";
//实习员工接口
var internshipInterface = "http://"+serverAddress+":"+deptEmpManageServicePort+"/api/"+empPermString+"/employee-curd/internship";
//正式员工接口
var regularInterface = "http://"+serverAddress+":"+deptEmpManageServicePort+"/api/"+empPermString+"/employee-curd/regular";
//离职员工接口
var departureInterface = "http://"+serverAddress+":"+deptEmpManageServicePort+"/api/"+empPermString+"/employee-curd/departure";
//简历接口
var resumeInterface = "http://"+serverAddress+":"+deptEmpManageServicePort+"/api/"+empPermString+"/employee-curd/resume";
//民族数据接口
var nationInterface = "http://"+serverAddress+":"+deptEmpManageServicePort+"/api/"+empPermString+"/employee-curd/nation";


/* 权限鉴定 */
//权限鉴定接口
var permissionInterface = "http://"+serverAddress+":"+permissionServicePort+"/api/"+checkPermString+"/perm";


/* 用户权限 */
//用户(带角色)接口
var userWithRoleInterface = "http://"+serverAddress+":"+permissionServicePort+"/api/"+userPermString+"/user-curd/users";
//检查用户接口
var checkUserInterface = "http://"+serverAddress+":"+permissionServicePort+"/api/"+userPermString+"/user-curd/check-user";
//获取全角色接口(给用户使用)
var getAllRoleInterface = "http://"+serverAddress+":"+permissionServicePort+"/api/"+userPermString+"/user-curd/roles";


/* 角色权限 */
//角色接口
var roleInterface = "http://"+serverAddress+":"+permissionServicePort+"/api/"+rolePermString+"/role-curd/roles";
//获取全资源接口
var getAllResourceInterface = "http://"+serverAddress+":"+permissionServicePort+"/api/"+rolePermString+"/role-curd/resources";